/*
 * Copyright 2020 HPB Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.hpb.bc.example;

import java.util.ArrayList;
import java.util.List;

import com.hpb.bc.entity.CommonEntity;

public class BlockAddrsExample extends CommonEntity {
    private static final long serialVersionUID = 7520638581698108973L;

    private String addr;

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    private Long bNumber;

    public Long getbNumber() {
        return bNumber;
    }

    public void setbNumber(Long bNumber) {
        this.bNumber = bNumber;
    }

    private String blockHash;

    public String getBlockHash() {
        return blockHash;
    }

    public void setBlockHash(String blockHash) {
        this.blockHash = blockHash;
    }

    /**
     * This field was generated by MyBatis Generator. This field corresponds to the
     * database table block_addrs_9
     *
     * @mbg.generated
     */
    protected String orderByClause;

    /**
     * This field was generated by MyBatis Generator. This field corresponds to the
     * database table block_addrs_9
     *
     * @mbg.generated
     */
    protected boolean distinct;

    /**
     * This field was generated by MyBatis Generator. This field corresponds to the
     * database table block_addrs_9
     *
     * @mbg.generated
     */
    protected List<Criteria> oredCriteria;

    /**
     * This method was generated by MyBatis Generator. This method corresponds to
     * the database table block_addrs_9
     *
     * @mbg.generated
     */
    public BlockAddrsExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    /**
     * This method was generated by MyBatis Generator. This method corresponds to
     * the database table block_addrs_9
     *
     * @mbg.generated
     */
    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    /**
     * This method was generated by MyBatis Generator. This method corresponds to
     * the database table block_addrs_9
     *
     * @mbg.generated
     */
    public String getOrderByClause() {
        return orderByClause;
    }

    /**
     * This method was generated by MyBatis Generator. This method corresponds to
     * the database table block_addrs_9
     *
     * @mbg.generated
     */
    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    /**
     * This method was generated by MyBatis Generator. This method corresponds to
     * the database table block_addrs_9
     *
     * @mbg.generated
     */
    public boolean isDistinct() {
        return distinct;
    }

    /**
     * This method was generated by MyBatis Generator. This method corresponds to
     * the database table block_addrs_9
     *
     * @mbg.generated
     */
    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    /**
     * This method was generated by MyBatis Generator. This method corresponds to
     * the database table block_addrs_9
     *
     * @mbg.generated
     */
    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    /**
     * This method was generated by MyBatis Generator. This method corresponds to
     * the database table block_addrs_9
     *
     * @mbg.generated
     */
    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    /**
     * This method was generated by MyBatis Generator. This method corresponds to
     * the database table block_addrs_9
     *
     * @mbg.generated
     */
    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    /**
     * This method was generated by MyBatis Generator. This method corresponds to
     * the database table block_addrs_9
     *
     * @mbg.generated
     */
    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    /**
     * This method was generated by MyBatis Generator. This method corresponds to
     * the database table block_addrs_9
     *
     * @mbg.generated
     */
    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    /**
     * This class was generated by MyBatis Generator. This class corresponds to the
     * database table block_addrs_9
     *
     * @mbg.generated
     */
    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andBNumberIsNull() {
            addCriterion("b_number is null");
            return (Criteria) this;
        }

        public Criteria andBNumberIsNotNull() {
            addCriterion("b_number is not null");
            return (Criteria) this;
        }

        public Criteria andBNumberEqualTo(Long value) {
            addCriterion("b_number =", value, "bNumber");
            return (Criteria) this;
        }

        public Criteria andBNumberNotEqualTo(Long value) {
            addCriterion("b_number <>", value, "bNumber");
            return (Criteria) this;
        }

        public Criteria andBNumberGreaterThan(Long value) {
            addCriterion("b_number >", value, "bNumber");
            return (Criteria) this;
        }

        public Criteria andBNumberGreaterThanOrEqualTo(Long value) {
            addCriterion("b_number >=", value, "bNumber");
            return (Criteria) this;
        }

        public Criteria andBNumberLessThan(Long value) {
            addCriterion("b_number <", value, "bNumber");
            return (Criteria) this;
        }

        public Criteria andBNumberLessThanOrEqualTo(Long value) {
            addCriterion("b_number <=", value, "bNumber");
            return (Criteria) this;
        }

        public Criteria andBNumberIn(List<Long> values) {
            addCriterion("b_number in", values, "bNumber");
            return (Criteria) this;
        }

        public Criteria andBNumberNotIn(List<Long> values) {
            addCriterion("b_number not in", values, "bNumber");
            return (Criteria) this;
        }

        public Criteria andBNumberBetween(Long value1, Long value2) {
            addCriterion("b_number between", value1, value2, "bNumber");
            return (Criteria) this;
        }

        public Criteria andBNumberNotBetween(Long value1, Long value2) {
            addCriterion("b_number not between", value1, value2, "bNumber");
            return (Criteria) this;
        }

        public Criteria andBlockHashIsNull() {
            addCriterion("block_hash is null");
            return (Criteria) this;
        }

        public Criteria andBlockHashIsNotNull() {
            addCriterion("block_hash is not null");
            return (Criteria) this;
        }

        public Criteria andBlockHashEqualTo(String value) {
            addCriterion("block_hash =", value, "blockHash");
            return (Criteria) this;
        }

        public Criteria andBlockHashNotEqualTo(String value) {
            addCriterion("block_hash <>", value, "blockHash");
            return (Criteria) this;
        }

        public Criteria andBlockHashGreaterThan(String value) {
            addCriterion("block_hash >", value, "blockHash");
            return (Criteria) this;
        }

        public Criteria andBlockHashGreaterThanOrEqualTo(String value) {
            addCriterion("block_hash >=", value, "blockHash");
            return (Criteria) this;
        }

        public Criteria andBlockHashLessThan(String value) {
            addCriterion("block_hash <", value, "blockHash");
            return (Criteria) this;
        }

        public Criteria andBlockHashLessThanOrEqualTo(String value) {
            addCriterion("block_hash <=", value, "blockHash");
            return (Criteria) this;
        }

        public Criteria andBlockHashLike(String value) {
            addCriterion("block_hash like", value, "blockHash");
            return (Criteria) this;
        }

        public Criteria andBlockHashNotLike(String value) {
            addCriterion("block_hash not like", value, "blockHash");
            return (Criteria) this;
        }

        public Criteria andBlockHashIn(List<String> values) {
            addCriterion("block_hash in", values, "blockHash");
            return (Criteria) this;
        }

        public Criteria andBlockHashNotIn(List<String> values) {
            addCriterion("block_hash not in", values, "blockHash");
            return (Criteria) this;
        }

        public Criteria andBlockHashBetween(String value1, String value2) {
            addCriterion("block_hash between", value1, value2, "blockHash");
            return (Criteria) this;
        }

        public Criteria andBlockHashNotBetween(String value1, String value2) {
            addCriterion("block_hash not between", value1, value2, "blockHash");
            return (Criteria) this;
        }


        public Criteria andTxcountIsNull() {
            addCriterion("txcount is null");
            return (Criteria) this;
        }

        public Criteria andTxcountIsNotNull() {
            addCriterion("txcount is not null");
            return (Criteria) this;
        }

        public Criteria andTxcountEqualTo(Integer value) {
            addCriterion("txcount =", value, "txcount");
            return (Criteria) this;
        }

        public Criteria andTxcountNotEqualTo(Integer value) {
            addCriterion("txcount <>", value, "txcount");
            return (Criteria) this;
        }

        public Criteria andTxcountGreaterThan(Integer value) {
            addCriterion("txcount >", value, "txcount");
            return (Criteria) this;
        }

        public Criteria andTxcountGreaterThanOrEqualTo(Integer value) {
            addCriterion("txcount >=", value, "txcount");
            return (Criteria) this;
        }

        public Criteria andTxcountLessThan(Integer value) {
            addCriterion("txcount <", value, "txcount");
            return (Criteria) this;
        }

        public Criteria andTxcountLessThanOrEqualTo(Integer value) {
            addCriterion("txcount <=", value, "txcount");
            return (Criteria) this;
        }

        public Criteria andTxcountIn(List<Integer> values) {
            addCriterion("txcount in", values, "txcount");
            return (Criteria) this;
        }

        public Criteria andTxcountNotIn(List<Integer> values) {
            addCriterion("txcount not in", values, "txcount");
            return (Criteria) this;
        }

        public Criteria andTxcountBetween(Integer value1, Integer value2) {
            addCriterion("txcount between", value1, value2, "txcount");
            return (Criteria) this;
        }

        public Criteria andTxcountNotBetween(Integer value1, Integer value2) {
            addCriterion("txcount not between", value1, value2, "txcount");
            return (Criteria) this;
        }
    }

    /**
     * This class was generated by MyBatis Generator. This class corresponds to the
     * database table block_addrs_9
     *
     * @mbg.generated do_not_delete_during_merge
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    /**
     * This class was generated by MyBatis Generator. This class corresponds to the
     * database table block_addrs_9
     *
     * @mbg.generated
     */
    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}